<template>
	<el-card class="box-card">
		<div slot="header" class="clearfix">
			<h1>文档标题</h1>
			<el-button style="float: right; padding: 3px 0" type="text">收藏</el-button>
		</div>
		<div class="text item article-content">
			文档正文文档正文文档正文文档正文文档正文文档正文文档正文文档正文文档正文文档正文文档正文文档
			正文文档正文文档正文文档正文文档正文文档正文文档正文文档正文
		</div>
	</el-card>
</template>
<script>
	export default{
		data() {
			return {
				document: null,
				document_id: null,
			}
		},
		mounted() {
			console.log(123123)
			this.getDocument()
		},
		methods: {
			getDocument(){
				this.document_id = this.$router.params.id
				this.$http.get(`http://127.0.0.1:8000/documents/{document_id}`).then(result=>{
					console.log(result)
				})
			}
		}
	}
</script>
<style>
	.text {
		font-size: 14px;
	}

	.item {
		margin-bottom: 18px;
	}

	.clearfix:before,
	.clearfix:after {
		display: table;
		content: "";
	}

	.clearfix:after {
		clear: both
	}

	.box-card {
		width: 100%;
	}
</style>
